package com.mmw.ruiji.controller;


import com.mmw.ruiji.entity.Dish;
import com.mmw.ruiji.entity.R;
import com.mmw.ruiji.server.DishServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dish")
public class DIshController {
    @Autowired
    DishServer dishServer;

    @GetMapping("/page")
    public R<List<Dish>> getDishes(int page,int pageSize){
        return R.success(dishServer.getDishes());
    }
}
